//
//  KuserInfo.h
//  Peanut
//
//  Created by Jim huang on 2018/3/30.
//  Copyright © 2018年 Jim_Peanut. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KUserModel.h"

@interface KuserInfo : NSObject

@property (nonatomic,strong)KUserModel * userModel;
@property (nonatomic,assign)BOOL isLogin;
//单例
+ (instancetype)shareInstance;

//保存usermodel到本地
-(BOOL)archiveUserInfo;

//从本地取出userModel
-(KUserModel *)unarchiveUserInfo;

//更新用户信息并保存
-(void)updateUserModel:(void(^)(KUserModel *userModel))successBlock failure:(void(^)(void))failureBlock;

//退出登录
-(void)logout;

//当前版本
-(NSString *)currentVersion ;

/**判断是否有相机权限*/
+ (BOOL)isCameraDeviceAvalable;

@end
